package com.travel.server.manager.impl.youzan;

/**
 * @Author: LiZhenhui
 * @Date: 2018/11/26 16:47
 * @Desc:
 */
public enum YouzanTypeEnum {
    NORMAL("NORMAL", "普通订单"),
    PEERPAY("PEERPAY", "代付订单"),
    GIFT("GIFT", "送礼订单"),
    FX_CAIGOUDAN("FX_CAIGOUDAN", "分销采购单"),
    PRESENT("PRESENT", "赠品"),
    WISH("WISH", "心愿订单"),
    QRCODE("QRCODE", "二维码订单"),
    QRCODE_3RD("QRCODE_3RD", "扫码收款"),
    FX_MERGED("FX_MERGED", "合并付货款"),
    VERIFIED("VERIFIED", "1分钱实名认证"),
    PINJIAN("PINJIAN", "品鉴"),

    REBATE("REBATE", "返利"),
    FX_QUANYUANDIAN("FX_QUANYUANDIAN", "全员开店"),
    FX_DEPOSIT("FX_DEPOSIT", "保证金"),
    PF("PF", "批发"),
    GROUP("GROUP", "多人拼团订单"),
    HOTEL("HOTEL", "酒店"),
    TAKE_AWAY("TAKE_AWAY", "外卖"),
    CATERING_OFFLINE("CATERING_OFFLINE", "堂食点餐"),
    CATERING_QRCODE("CATERING_QRCODE", "外卖买单"),
    BEAUTY_APPOINTMENT("BEAUTY_APPOINTMENT", "美业预约单"),
    BEAUTY_SERVICE("BEAUTY_SERVICE", "美业服务单"),
    KNOWLEDGE_PAY("KNOWLEDGE_PAY", "知识付费"),
    GIFT_CARD("GIFT_CARD", "礼品卡订单"),
    ;

    private String code;

    private String desc;

    YouzanTypeEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(String code){
        for(YouzanTypeEnum typeEnum : YouzanTypeEnum.values()){
            if(typeEnum.getCode().equals(code)){
                return typeEnum.getDesc();
            }
        }
        return null;
    }
}
